﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Intranet.Models.activity>" %>
<div id="activitySummary">
<script>
    $(function () {
        $(".dateBox").datepicker(
        {
         dateFormat:'dd/mm/yy'
        });
    });
	</script>
<% using (Ajax.BeginForm("AmendActivity", new AjaxOptions { UpdateTargetId="activitySummary", InsertionMode=InsertionMode.Replace }))
   { %>
<table>
    <tr>
        <th>
            <%:Html.DisplayTextFor(model => Model.details)%>
        </th>
        <th class="rightAlign">
            Due by:<%:Html.TextBox("dueDate", Model.dueDate, new { onchange = "this.form.submit()", @class="dateBox" })%>
            <%:Html.HiddenFor(model=>model.id) %>
        </th>
    </tr>
</table>
<%} %>
</div>